﻿ALTER TABLE [dbo].[SecurityWindowsUser_Role_Xref]
	ADD CONSTRAINT [CC_SecurityWindowsUser_Role_Xref_IncludeChildren] 
	CHECK  (
	(SUX_HierarchyID IS NULL AND SUX_IncludeChildren IS NULL)
	OR
	(SUX_HierarchyID IS NOT NULL AND SUX_IncludeChildren IS NOT NULL)
			)
-- This Constraints Keeps ensures that IncludeChildren is set where ever a Specific HierarchyID is applied.
